import request from '@/utils/request'

// GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
export default {
    //   获取商品属性列表
    reqGetAttrList({ category1Id, category2Id, category3Id }) {
        return request.get(`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`)
    },
    /* 
删除指定id的属性
DELETE /admin/product/deleteAttr/{attrId}
*/
    remove(id) {
        return request.delete(`/admin/product/deleteAttr/${id}`)
    },

    /* 
添加和更新属性
POST /admin/product/saveAttrInfo
*/
    save(attrInfo) {
        return request.post('/admin/product/saveAttrInfo', attrInfo)
    },
}